import axios from 'axios'
import store from '@/store'
import router from '@/router'

//项目基地址
// export const baseURL = 'http://big-event-vue-api-t.itheima.net'
// export const baseURL = 'http://10.16.1.135:8090/api'
export const baseURL = 'http://172.16.93.106:8090/api'
const myAxios = axios.create({
  baseURL
})

//请求拦截器(为后面的请求头部添加token)
 myAxios.interceptors.request.use(function(config){
   return config
},function(error) {
  return Promise.reject(error)
})


//响应拦截器(用于处理接口错误问题)
  myAxios.interceptors.response.use(function(response){

    return response

  },function(error){

    return Promise.reject(error)
  })

//自定义导出
export default myAxios
